<!DOCTYPE html>
<!--suppress ThymeleafVariablesResolveInspection -->
<html lang="en" xmlns:th="http://www.thymeleaf.org/">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>天天生鲜-用户中心</title>
	<div th:replace="header::common_resource"></div>
</head>
<body>
	<div th:replace="top::top"></div>

	<div class="main_con clearfix">
		<div class="left_menu_con clearfix">
			<h3>用户中心</h3>
			<ul>
				<li><a href="/user/getUserCenterPage">· 个人信息</a></li>
				<li><a href="/order/getOrderListPage">· 全部订单</a></li>
				<li><a href="/user/getAddressListPage" class="active">· 收货地址</a></li>
				<li><a href="/user/getUserUpdatePage">· 修改个人信息</a></li>
			</ul>
		</div>
		<div class="right_content clearfix">
				<h3 class="common_title2">编辑信息</h3>
				<div class="site_con">
					<form id="formId">
						<input th:value="${session.user.id}" name="id" type="hidden">
						<div class="form_group">
							<label>用户名：</label>
							<input type="text" name="username" th:value="${session.user.username}">
						</div>
						<div class="form_group">
							<label>电话：</label>
							<input type="text" name="phone" th:value="${session.user.phone}">
						</div>

						<input type="button" name="" value="提交" class="info_submit" onclick="submitForm()">
					</form>
				</div>
		</div>
	</div>



	<div class="footer">
		<div class="foot_link">
			<a href="#">关于我们</a>
			<span>|</span>
			<a href="#">联系我们</a>
			<span>|</span>
			<a href="#">招聘人才</a>
			<span>|</span>
			<a href="#">友情链接</a>		
		</div>
		<p>CopyRight © 2016 北京天天生鲜信息技术有限公司 All Rights Reserved</p>
		<p>电话：010-****888    京ICP备*******8号</p>
	</div>

	<script>
		submitForm = function () {
			$.post(
				'/user/update',
				$('#formId').serialize(),
				function (result) {
					if (result.ok) {
						mylayer.okMsg(result.msg);
					} else {
						mylayer.errorMsg(result.msg);
					}
				}
			);
		}
	</script>
	
</body>
</html>